package com.wdd.owntool.adapter

import android.content.Context
import com.wdd.libbase.Interface.RecyclerItemClickInterface
import com.wdd.libbase.base.OwnRecyclerViewAdapter
import com.wdd.libbase.view.antiShakeClick
import com.wdd.owntool.R
import kotlinx.android.synthetic.main.adapter_main_str.view.*

/**
 *
 * @ProjectName:    OwnTool
 * @Package:        com.wdd.owntool.adapter
 * @ClassName:      RefreshRecyclerAdapter
 * @Description:     java类作用描述
 * @Author:         王丹丹
 * @CreateDate:     2019/12/21 22:30
 * @UpdateUser:     更新者
 * @UpdateDate:     2019/12/21 22:30
 * @UpdateRemark:   更新说明
 * @Version:        1.0
 */
class RefreshRecyclerAdapter(
    context: Context,
    datas: List<String>?,
    var recyclerItemClickInterface: RecyclerItemClickInterface? = null
) :
    OwnRecyclerViewAdapter<String>(context, datas) {

    override fun getLayoutId(): Int {
        return R.layout.adapter_main_str
    }

    override fun onBindViewHolder(holder: ViewHolder, position: Int) {
        holder.itemView.text1.text = "测试"
        holder.itemView.antiShakeClick {
            recyclerItemClickInterface?.onItemClick(position)
        }
    }


}